Skip to content

Conversation

biwenli
Copy link
Contributor

@biwenli biwenli commented Jul 28, 2025

enable irqsteer for imx943.

zephyr_library_sources_ifdef(CONFIG_RENESAS_RX_ICU intc_renesas_rx_icu.c)
zephyr_library_sources_ifdef(CONFIG_RENESAS_RZ_EXT_IRQ intc_renesas_rz_ext_irq.c)
zephyr_library_sources_ifdef(CONFIG_NXP_IRQSTEER intc_nxp_irqsteer.c)
zephyr_library_sources_ifdef(CONFIG_NXP_IRQSTEER1 intc_nxp_irqsteer1.c)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain why do you need a new driver?
Why the intc_nxp_irqsteer.c driver is not enough?

In the commit message you state that the "old" intc_nxp_irqsteer driver can be replaced.
In this case, why don't you enhance the intc_nxp_irqsteer driver with the support that you need for i.MX943?

Copy link
Contributor Author

@biwenli biwenli Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's a good question.

Because of the new structure of irqsteer(https://github.com/zephyrproject-rtos/hal_nxp/blob/master/mcux/mcux-sdk-ng/devices/i.MX/i.MX943/periph/PERI_IRQSTEER.h#L244) is different with the old structure of irqsteer(https://github.com/zephyrproject-rtos/hal_nxp/blob/master/mcux/mcux-sdk-ng/devices/i.MX/i.MX95/periph/PERI_IRQSTEER.h#L145),
image

The new driver doesn't depend on the structure IRQSTEER_TYPE. It can be used in all of platforms.(i.mx8, i.mx95, i.mx943. Include irqsteer instance dpu_irqsteer, m33_irqsteer, m7_irqsteer, a55_irqsteer, dsp_irqsteer, hdmi_irqsteer)

Copy link
Contributor

@dbaluta dbaluta Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biwenli so your proposal is to replace the "old" irqsteer driver with the new one?

Usually, when such a thing is happening you need to update all the references to the old driver with the new one. And as last point remove the old driver.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biwenli so your proposal is to replace the "old" irqsteer driver with the new one?

Usually, when such a thing is happening you need to update all the references to the old driver with the new one. And as last point remove the old driver.

Yes, the old driver will be phased out over time. New product will use the new driver directly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biwenli Could you please add a note indicating that the old irqsteer will be deprecated and should no longer be used in new samples or products?
Also, it would be helpful to include at least one commit where the old irqsteer is replaced with the new implementation, so others can refer to it as an example.
Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biwenli Could you please add a note indicating that the old irqsteer will be deprecated and should no longer be used in new samples or products? Also, it would be helpful to include at least one commit where the old irqsteer is replaced with the new implementation, so others can refer to it as an example. Thanks.

@iuliana-prodan ,

Sure, np. Thanks.

@decsny decsny assigned JiafeiPan and unassigned decsny Jul 28, 2025
@biwenli biwenli force-pushed the imx943-add-new-irqsteer1-driver branch from 2112635 to 1f02269 Compare July 29, 2025 04:49
Copy link

github-actions bot commented Jul 29, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@dbaluta
Copy link
Contributor

dbaluta commented Jul 30, 2025

@biwenli you will also need to convert at least 1 user of the old driver to test your new implemenation. Ideally would be to convert all users, but we can do it in phases as we don't want to slow you down.

@biwenli biwenli force-pushed the imx943-add-new-irqsteer1-driver branch from 280c91f to f0e2e5c Compare October 13, 2025 03:09
@dleach02
Copy link
Member

@dbaluta @iuliana-prodan can you reengage on this PR now that it is clear CI

@biwenli biwenli force-pushed the imx943-add-new-irqsteer1-driver branch from f0e2e5c to 23f8870 Compare October 14, 2025 03:38
@biwenli biwenli force-pushed the imx943-add-new-irqsteer1-driver branch 2 times, most recently from 651c8e1 to 7e7f35c Compare October 17, 2025 08:15
There are two irqsteer driver in mcux sdk,
Their apis are not compatible. So add new option
CONFIG_INTC_MCUX_IRQSTEER_V1
to pick right irqsteer driver in mcux sdk for
the zephyr irqsteer driver

Signed-off-by: Biwen Li <[email protected]>
Add option INTC_MCUX_IRQSTEER_V1 to
pick right nxp mcux sdk irqsteer driver
(there are two irqsteer driver in mcux sdk).

Signed-off-by: Biwen Li <[email protected]>
Add irqsteer node to support
multi level interrupts

Signed-off-by: Biwen Li <[email protected]>
Add new property nxp,version to
pick right irqsteer driver in nxp mcux sdk
(There are two irqsteer driver in nxp mcux sdk,
and their apis are not compatible).

Signed-off-by: Biwen Li <[email protected]>
Pick right irqsteer driver in nxp mcux sdk.

Signed-off-by: Biwen Li <[email protected]>
This commit enables multi level interrupts:
- enable multi level interrupts
  imx943 is a two level interrupts system
- Increase irq number from 405 to 790
  Actually there are 407(IRQ 0 ~ IRQ 406) interrupts
  from nvic(first level interrupts),
  The second level interrupts are extended by irqsteer,
  it extends 32 x 12 = 384 interrupts,
  So first level interrupts + second level interrupts
  = 407 + 384 = 791(IRQ 0 ~ IRQ 790) interrupts

Signed-off-by: Biwen Li <[email protected]>
Enable edma4 by default for m33(in NETCMIX) of imx943_evk

Signed-off-by: Biwen Li <[email protected]>
- Add priority attribute to support multi level interrupts

Update interrupt-cells of irqsteer master
  - DT_INST_IRQ_BY_IDX(n, idx, priority) is used to
    get priority attribute of interrupt in some drivers,
    so add priority for irqsteer master to align priority
    attribute.

dts: arm: nxp: imx95: m7: increase the number of interrupt-cells
  - Increase the number of interrupt-cells to support
    the new added priority attribute for irqsteer.

Increase the number of interrupt-cells for imx95_m7
  - Add priority attribute to fix build issue.

dts: xtensa: nxp: unify irqsteer's interrupt attributes
with general interrupt

Unify irqsteer's interrupt attributes with general interrupt
for imx8, imx8m, imx8qm, imx8qxp.
  - add priority attribute to fix build issue

tests: drivers: intc: imx8mp_evk: adsp: unify irqsteer's interrupt
attributes with general interrupt

Unify irqsteer's interrupt attributes with general interrupt for
imx8mp_evk_mimx8ml8_adsp
  - Add priority attribute to fix build issue.

Signed-off-by: Biwen Li <[email protected]>
Correct irq number for multi level interrupts

Signed-off-by: Biwen Li <[email protected]>
- Print SADDR, DADDR for debugging.

Signed-off-by: Biwen Li <[email protected]>
Add config for imx943_evk_mimx94398_m33
- Use the sample to test the irqsteer driver

Signed-off-by: Biwen Li <[email protected]>
This commit fixes build issue when multi level interrupts is enabled,
define TEST_IRQ_NUM as (CONFIG_2ND_LVL_ISR_TBL_OFFSET - 1)
  - CMSIS/Core/Include/core_cm33.h:2438:15: error: array subscript 24
    is above array bounds of volatile uint32_t[16]

Signed-off-by: Biwen Li <[email protected]>
This commit fixes build issue when multi level interrupts feature
is enabled, define new macro TEST_1ST_LEVEL_INTERRUPTS_MAX to
support multi level interrupts case.
  - error: array subscript 24 is above array bounds of 'volatile
    uint32_t[16]' {aka 'volatile unsigned int[16]'}
    [-Werror=array-bounds])

Signed-off-by: Biwen Li <[email protected]>
Fix build issue when multi level interrupts is enabled,
define new macro TEST_1ST_LEVEL_INTERRUPTS_MAX to support multi
level interrupts case.
  - core_cm33.h:2559:47: error: iteration 496 invokes undefined behavior
    [-Werror=aggressive-loop-optimizations]

Signed-off-by: Biwen Li <[email protected]>
Exclude imx943,
  - multi level interrupts feature is enabled defaultly,
    so irqsteer1 driver is enabled, then the test case
    report the build issue:
    multiple definition of z_soc_irq_enable,
    tests/arch/arm/arm_custom_interrupt/src/arm_custom_interrupt.c:47
    first defined here.

Signed-off-by: Biwen Li <[email protected]>
@biwenli biwenli force-pushed the imx943-add-new-irqsteer1-driver branch from 7e7f35c to fccc04c Compare October 17, 2025 08:38
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: DMA Direct Memory Access area: Interrupt Controller area: Samples Samples area: UART Universal Asynchronous Receiver-Transmitter area: Xtensa Xtensa Architecture platform: NXP Drivers NXP Semiconductors, drivers platform: NXP MPU platform: NXP NXP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants